package com.suyuan.dao;

import java.util.List;

import com.suyuan.entity.HotProduct;
import com.suyuan.entity.ProductInfo;
import com.suyuan.entity.ProductInfoExample;
import com.suyuan.entity.RecommProduct;
import org.apache.ibatis.annotations.Param;

public interface ProductInfoMapper {
    int countByExample(ProductInfoExample example);

    int deleteByExample(ProductInfoExample example);

    int deleteByPrimaryKey(Integer productid);

    int insert(ProductInfo record);

    int insertSelective(ProductInfo record);

    List<ProductInfo> selectByExample(ProductInfoExample example);

    ProductInfo selectByPrimaryKey(Integer productid);

    int updateByExampleSelective(@Param("record") ProductInfo record, @Param("example") ProductInfoExample example);

    int updateByExample(@Param("record") ProductInfo record, @Param("example") ProductInfoExample example);

    int updateByPrimaryKeySelective(ProductInfo record);

    int updateByPrimaryKey(ProductInfo record);

    List<HotProduct> getHotProduct();

    void deleteHotProduct(Integer id);

    Integer insertProductReturnId(ProductInfo product);

    void insertHotProduct(HotProduct product);

    //溯源商城后台获取热门商品数量
    Integer getRecommProductNumber();
    //添加推荐商品
    void addRecommproduct(Integer id);
    //查找所有推荐商品
    List<RecommProduct> findAllRecommproduct();
    //删除推荐商品
    void deleteRecommProduct(Integer id);
}